Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-502) Correct path separator in nuspec file element #19

Closed
wants to merge 1 commit into from

Conversation

TheCakeIsNaOH
Copy link
Member

@TheCakeIsNaOH TheCakeIsNaOH commented Jul 4, 2020

Converts the path separator character in the nuspec file source to the
character that is correct for the OS that is running the packing
operation. Changes "\" to "/" on Linux and MacOS systems, and
changes "/" to "\" on Windows systems.

Fixes: chocolatey/choco#502
Fixes: chocolatey/choco#2166

Converts the path separator character in the nuspec file source to the
character that is correct for the OS that is running the packing
operation. Changes "\" to "/" on Linux and MacOS systems, and
changes "/" to "\" on Windows systems.

Fixes: chocolatey/choco#502
@TheCakeIsNaOH
Copy link
Member Author

@ferventcoder Ready for a re-review

@TheCakeIsNaOH
Copy link
Member Author

@ferventcoder
Added an issue over at the choco repository with more information as to why correcting the separator for windows as well is needed.
chocolatey/choco#2166

@TheCakeIsNaOH
Copy link
Member Author

Here is the previous commit in choco as to why switching the seperator on Windows is needed as well: chocolatey/choco@e5a02a0

@gep13
Copy link
Member

gep13 commented May 4, 2021

This has been rebased and merged here: a8e3432

I will go ahead and close out this PR. Thanks for getting this updated, appreciate it!

@gep13 gep13 closed this May 4, 2021
@gep13
Copy link
Member

gep13 commented May 4, 2021

For future folks looking at this PR, the issue referenced in this PR, and in the commit message, references the issue on the chocolatey/choco repository. For future PR's, we should replicate the issue in this repository, so that we can correctly hook everything up.

@gep13 gep13 added this to the 2.11.0.20210506 milestone May 6, 2021
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this pull request May 7, 2021
When using a relative path, pack only works if the current directory is
the same as the directory containing the nuspec. This switches the
relative path to an absolute path for non-windows platforms (windows
already uses an absolute path). This change allows pack to work from
any directory.

Previously, in c0b23a6 and e5a02a0, non-windows platforms were switched
to using a relative path for files, so that the default files separator
in the nuspec files element could be switched to a backslash (chocolatey#2166)
However, the issue with forward/back slashes is fixed by
chocolatey/nuget-chocolatey#19, so the previous change can now be
reverted.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this pull request May 10, 2021
When using a relative path, pack only works if the current directory is
the same as the directory containing the nuspec. This switches the
relative path to an absolute path for non-windows platforms (windows
already uses an absolute path). This change allows pack to work from
any directory.

Previously, in c0b23a6 and e5a02a0, non-windows platforms were switched
to using a relative path for files, so that the default files separator
in the nuspec files element could be switched to a backslash (chocolatey#2166)
However, the issue with forward/back slashes is fixed by
chocolatey/nuget-chocolatey#19, so the previous change can now be
reverted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants